
 import { MessageBox } from 'mint-ui';
 
 export default {
   install(Vue){
		 Vue.prototype.loginsuccess = function (){
			// 登录成功
			if (sessionStorage.getItem('fan')){
			    this.$toast({
			      message:'登录成功',
			    });
			    sessionStorage.clear('fan');
			}
			if (sessionStorage.getItem('bug')){
			  this.$toast({
			    message:'绑定成功',
			  });
			  sessionStorage.removeItem('bug')
			}
				
			if (localStorage.getItem('token')) {
				this.axios.defaults.headers.common['token'] = localStorage.getItem('token');
				this.axios.get(this.$store.state.url + "User/getUserInfo").then(res=>{
				  // console.log(res.data)
				  if (res.data.errcode == 0||res.data.errcode == '0'){
				  }
				})
				
			}
				
			


		 };

   }
 };



